import time

from selenium import webdriver

# 获取浏览器驱动对象
browser = webdriver.Chrome()

# 打开指定URL
browser.get('https://movie.douban.com/top250')

time.sleep(1)

# 定位25个电影信息
# ret = browser.find_elements_by_css_selector('.item')  # 查询class为item
# print(ret)

ret = browser.find_elements_by_xpath("//*[@class='item']")
print(ret)

time.sleep(3)

browser.quit()
